## API Report File for "@backstage/plugin-linguist-backend"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { CatalogProcessor } from '@backstage/plugin-catalog-node';
import { CatalogProcessorCache } from '@backstage/plugin-catalog-node';
import { Config } from '@backstage/config';
import { DiscoveryService } from '@backstage/backend-plugin-api';
import { Entity } from '@backstage/catalog-model';
import express from 'express';
import { HumanDuration } from '@backstage/types';
import { Languages } from '@backstage/plugin-linguist-common';
import { LanguageType } from '@backstage/plugin-linguist-common';
import { Logger } from 'winston';
import { PluginDatabaseManager } from '@backstage/backend-common';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
import { TaskScheduleDefinition } from '@backstage/backend-tasks';
import { TokenManager } from '@backstage/backend-common';
import { UrlReader } from '@backstage/backend-common';

// @public (undocumented)
export function createRouter(
  pluginOptions: PluginOptions,
  routerOptions: RouterOptions,
): Promise<express.Router>;

// @public (undocumented)
export function createRouterFromConfig(
  routerOptions: RouterOptions,
): Promise<express.Router>;

// @public (undocumented)
export interface LinguistBackendApi {
  // (undocumented)
  getEntityLanguages(entityRef: string): Promise<Languages>;
  // (undocumented)
  processEntities(): Promise<void>;
}

// @public
const linguistPlugin: () => BackendFeature;
export default linguistPlugin;

// @public
export class LinguistTagsProcessor implements CatalogProcessor {
  constructor(options: LinguistTagsProcessorOptions);
  // (undocumented)
  static fromConfig(
    config: Config,
    options: LinguistTagsProcessorOptions,
  ): LinguistTagsProcessor;
  // (undocumented)
  getProcessorName(): string;
  preProcessEntity(
    entity: Entity,
    _: any,
    __: any,
    ___: any,
    cache: CatalogProcessorCache,
  ): Promise<Entity>;
}

// @public
export interface LinguistTagsProcessorOptions {
  bytesThreshold?: number;
  cacheTTL?: HumanDuration;
  // (undocumented)
  discovery: DiscoveryService;
  languageMap?: Record<string, string | undefined>;
  languageTypes?: LanguageType[];
  // (undocumented)
  logger: Logger;
  shouldProcessEntity?: ShouldProcessEntity;
}

// @public (undocumented)
export interface PluginOptions {
  // (undocumented)
  age?: HumanDuration;
  // (undocumented)
  batchSize?: number;
  // (undocumented)
  kind?: string[];
  // (undocumented)
  linguistJsOptions?: Record<string, unknown>;
  // (undocumented)
  schedule?: TaskScheduleDefinition;
  // (undocumented)
  useSourceLocation?: boolean;
}

// @public (undocumented)
export interface RouterOptions {
  // (undocumented)
  config?: Config;
  // (undocumented)
  database: PluginDatabaseManager;
  // (undocumented)
  discovery: PluginEndpointDiscovery;
  // (undocumented)
  linguistBackendApi?: LinguistBackendApi;
  // (undocumented)
  logger: Logger;
  // (undocumented)
  reader: UrlReader;
  // (undocumented)
  scheduler?: PluginTaskScheduler;
  // (undocumented)
  tokenManager: TokenManager;
}

// @public
export type ShouldProcessEntity = (entity: Entity) => boolean;
```
